.class public Lcom/qq/xgdemo/common/NotificationService;
.super Ljava/lang/Object;
.source "NotificationService.java"


# static fields
.field private static instance:Lcom/qq/xgdemo/common/NotificationService;


# instance fields
.field private dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 13
    const/4 v0, 0x0

    sput-object v0, Lcom/qq/xgdemo/common/NotificationService;->instance:Lcom/qq/xgdemo/common/NotificationService;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 15
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 16
    new-instance v0, Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-direct {v0, p1}, Lcom/qq/xgdemo/common/DBOpenHelper;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    .line 17
    return-void
.end method

.method public static declared-synchronized getInstance(Landroid/content/Context;)Lcom/qq/xgdemo/common/NotificationService;
    .locals 2
    .param p0, "ctx"    # Landroid/content/Context;

    .prologue
    .line 20
    const-class v1, Lcom/qq/xgdemo/common/NotificationService;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/qq/xgdemo/common/NotificationService;->instance:Lcom/qq/xgdemo/common/NotificationService;

    if-nez v0, :cond_0

    .line 21
    new-instance v0, Lcom/qq/xgdemo/common/NotificationService;

    invoke-direct {v0, p0}, Lcom/qq/xgdemo/common/NotificationService;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/qq/xgdemo/common/NotificationService;->instance:Lcom/qq/xgdemo/common/NotificationService;

    .line 23
    :cond_0
    sget-object v0, Lcom/qq/xgdemo/common/NotificationService;->instance:Lcom/qq/xgdemo/common/NotificationService;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    return-object v0

    .line 20
    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method


# virtual methods
.method public delete(Ljava/lang/Integer;)V
    .locals 6
    .param p1, "id"    # Ljava/lang/Integer;

    .prologue
    .line 39
    iget-object v1, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v1}, Lcom/qq/xgdemo/common/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    .line 40
    .local v0, "db":Landroid/database/sqlite/SQLiteDatabase;
    const-string v1, "notification"

    const-string v2, "id=?"

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/String;

    const/4 v4, 0x0

    invoke-virtual {p1}, Ljava/lang/Integer;->toString()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-virtual {v0, v1, v2, v3}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    .line 41
    return-void
.end method

.method public deleteAll()V
    .locals 4

    .prologue
    .line 44
    iget-object v1, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v1}, Lcom/qq/xgdemo/common/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    .line 45
    .local v0, "db":Landroid/database/sqlite/SQLiteDatabase;
    const-string v1, "notification"

    const-string v2, ""

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v2, v3}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    .line 46
    return-void
.end method

.method public find(Ljava/lang/Integer;)Lcom/qq/xgdemo/common/XGNotification;
    .locals 10
    .param p1, "id"    # Ljava/lang/Integer;

    .prologue
    const/4 v4, 0x1

    const/4 v7, 0x0

    const/4 v5, 0x0

    .line 62
    iget-object v1, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v1}, Lcom/qq/xgdemo/common/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    .line 64
    .local v0, "db":Landroid/database/sqlite/SQLiteDatabase;
    const-string v1, "notification"

    .line 65
    new-array v2, v4, [Ljava/lang/String;

    const-string v3, "id,msg_id,title,content,activity,notificationActionType,update_time"

    aput-object v3, v2, v7

    .line 66
    const-string v3, "id=?"

    new-array v4, v4, [Ljava/lang/String;

    invoke-virtual {p1}, Ljava/lang/Integer;->toString()Ljava/lang/String;

    move-result-object v6

    aput-object v6, v4, v7

    .line 67
    const-string v8, "1"

    move-object v6, v5

    move-object v7, v5

    .line 64
    invoke-virtual/range {v0 .. v8}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v9

    .line 69
    .local v9, "cursor":Landroid/database/Cursor;
    :try_start_0
    invoke-interface {v9}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 70
    new-instance v1, Lcom/qq/xgdemo/common/XGNotification;

    .line 71
    const-string v2, "id"

    invoke-interface {v9, v2}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v2

    .line 70
    invoke-interface {v9, v2}, Landroid/database/Cursor;->getInt(I)I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    .line 72
    const-string v3, "msg_id"

    invoke-interface {v9, v3}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v3

    .line 71
    invoke-interface {v9, v3}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v3

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    .line 73
    const-string v4, "title"

    invoke-interface {v9, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v4

    .line 72
    invoke-interface {v9, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 74
    const-string v5, "content"

    invoke-interface {v9, v5}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v5

    .line 73
    invoke-interface {v9, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v5

    .line 75
    const-string v6, "activity"

    invoke-interface {v9, v6}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v6

    .line 74
    invoke-interface {v9, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    .line 76
    const-string v7, "notificationActionType"

    invoke-interface {v9, v7}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v7

    .line 75
    invoke-interface {v9, v7}, Landroid/database/Cursor;->getInt(I)I

    move-result v7

    .line 77
    const-string v8, "update_time"

    invoke-interface {v9, v8}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v8

    .line 76
    invoke-interface {v9, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v8

    .line 70
    invoke-direct/range {v1 .. v8}, Lcom/qq/xgdemo/common/XGNotification;-><init>(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 81
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 79
    :goto_0
    return-object v1

    .line 81
    :cond_0
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    move-object v1, v5

    .line 79
    goto :goto_0

    .line 80
    :catchall_0
    move-exception v1

    .line 81
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 82
    throw v1
.end method

.method public getCount()I
    .locals 4

    .prologue
    .line 123
    iget-object v2, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v2}, Lcom/qq/xgdemo/common/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v1

    .line 124
    .local v1, "db":Landroid/database/sqlite/SQLiteDatabase;
    const-string v2, "select count(*) from notification"

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    .line 126
    .local v0, "cursor":Landroid/database/Cursor;
    :try_start_0
    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    .line 127
    const/4 v2, 0x0

    invoke-interface {v0, v2}, Landroid/database/Cursor;->getInt(I)I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v2

    .line 129
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 127
    return v2

    .line 128
    :catchall_0
    move-exception v2

    .line 129
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 130
    throw v2
.end method

.method public getScrollData(IILjava/lang/String;)Ljava/util/List;
    .locals 14
    .param p1, "currentPage"    # I
    .param p2, "lineSize"    # I
    .param p3, "msg_id"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(II",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List",
            "<",
            "Lcom/qq/xgdemo/common/XGNotification;",
            ">;"
        }
    .end annotation

    .prologue
    .line 87
    add-int/lit8 v2, p1, -0x1

    mul-int v2, v2, p2

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v11

    .line 88
    .local v11, "firstResult":Ljava/lang/String;
    iget-object v2, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v2}, Lcom/qq/xgdemo/common/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v1

    .line 89
    .local v1, "db":Landroid/database/sqlite/SQLiteDatabase;
    const/4 v10, 0x0

    .line 91
    .local v10, "cursor":Landroid/database/Cursor;
    if-eqz p3, :cond_0

    :try_start_0
    const-string v2, ""

    move-object/from16 v0, p3

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 93
    :cond_0
    const-string v2, "notification"

    .line 94
    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/String;

    const/4 v4, 0x0

    const-string v5, "id,msg_id,title,content,activity,notificationActionType,update_time"

    aput-object v5, v3, v4

    .line 95
    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/4 v7, 0x0

    const-string v8, "update_time DESC"

    .line 96
    new-instance v9, Ljava/lang/StringBuilder;

    invoke-static {v11}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v9, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v13, ","

    invoke-virtual {v9, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    move/from16 v0, p2

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    .line 93
    invoke-virtual/range {v1 .. v9}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v10

    .line 105
    :goto_0
    new-instance v12, Ljava/util/ArrayList;

    invoke-direct {v12}, Ljava/util/ArrayList;-><init>()V

    .line 106
    .local v12, "notifications":Ljava/util/List;, "Ljava/util/List<Lcom/qq/xgdemo/common/XGNotification;>;"
    :goto_1
    invoke-interface {v10}, Landroid/database/Cursor;->moveToNext()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v2

    if-nez v2, :cond_2

    .line 118
    invoke-interface {v10}, Landroid/database/Cursor;->close()V

    .line 116
    return-object v12

    .line 99
    .end local v12    # "notifications":Ljava/util/List;, "Ljava/util/List<Lcom/qq/xgdemo/common/XGNotification;>;"
    :cond_1
    :try_start_1
    const-string v2, "notification"

    .line 100
    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/String;

    const/4 v4, 0x0

    const-string v5, "id,msg_id,title,content,activity,notificationActionType,update_time"

    aput-object v5, v3, v4

    .line 101
    const-string v4, "msg_id like ?"

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/String;

    const/4 v6, 0x0

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-static/range {p3 .. p3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, "%"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    aput-object v7, v5, v6

    .line 102
    const/4 v6, 0x0

    const/4 v7, 0x0

    const-string v8, "update_time DESC"

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-static {v11}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v9, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 103
    const-string v13, ","

    invoke-virtual {v9, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    move/from16 v0, p2

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    .line 99
    invoke-virtual/range {v1 .. v9}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v10

    .line 98
    goto :goto_0

    .line 107
    .restart local v12    # "notifications":Ljava/util/List;, "Ljava/util/List<Lcom/qq/xgdemo/common/XGNotification;>;"
    :cond_2
    new-instance v2, Lcom/qq/xgdemo/common/XGNotification;

    .line 108
    const-string v3, "id"

    invoke-interface {v10, v3}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v3

    .line 107
    invoke-interface {v10, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    .line 109
    const-string v4, "msg_id"

    invoke-interface {v10, v4}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v4

    .line 108
    invoke-interface {v10, v4}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v4

    .line 110
    const-string v5, "title"

    invoke-interface {v10, v5}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v5

    .line 109
    invoke-interface {v10, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v5

    .line 111
    const-string v6, "content"

    invoke-interface {v10, v6}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v6

    .line 110
    invoke-interface {v10, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    .line 112
    const-string v7, "activity"

    invoke-interface {v10, v7}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v7

    .line 111
    invoke-interface {v10, v7}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v7

    .line 113
    const-string v8, "notificationActionType"

    invoke-interface {v10, v8}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v8

    .line 112
    invoke-interface {v10, v8}, Landroid/database/Cursor;->getInt(I)I

    move-result v8

    .line 114
    const-string v9, "update_time"

    invoke-interface {v10, v9}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v9

    .line 113
    invoke-interface {v10, v9}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v9

    invoke-direct/range {v2 .. v9}, Lcom/qq/xgdemo/common/XGNotification;-><init>(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V

    .line 107
    invoke-interface {v12, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto/16 :goto_1

    .line 117
    .end local v12    # "notifications":Ljava/util/List;, "Ljava/util/List<Lcom/qq/xgdemo/common/XGNotification;>;"
    :catchall_0
    move-exception v2

    .line 118
    invoke-interface {v10}, Landroid/database/Cursor;->close()V

    .line 119
    throw v2
.end method

.method public save(Lcom/qq/xgdemo/common/XGNotification;)V
    .locals 4
    .param p1, "notification"    # Lcom/qq/xgdemo/common/XGNotification;

    .prologue
    .line 27
    iget-object v2, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v2}, Lcom/qq/xgdemo/common/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    .line 28
    .local v0, "db":Landroid/database/sqlite/SQLiteDatabase;
    new-instance v1, Landroid/content/ContentValues;

    invoke-direct {v1}, Landroid/content/ContentValues;-><init>()V

    .line 29
    .local v1, "values":Landroid/content/ContentValues;
    const-string v2, "msg_id"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getMsg_id()Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 30
    const-string v2, "title"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 31
    const-string v2, "content"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getContent()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 32
    const-string v2, "activity"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getActivity()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 33
    const-string v2, "notificationActionType"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getNotificationActionType()I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 34
    const-string v2, "update_time"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getUpdate_time()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 35
    const-string v2, "notification"

    const/4 v3, 0x0

    invoke-virtual {v0, v2, v3, v1}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J

    .line 36
    return-void
.end method

.method public update(Lcom/qq/xgdemo/common/XGNotification;)V
    .locals 7
    .param p1, "notification"    # Lcom/qq/xgdemo/common/XGNotification;

    .prologue
    .line 49
    iget-object v2, p0, Lcom/qq/xgdemo/common/NotificationService;->dbOpenHelper:Lcom/qq/xgdemo/common/DBOpenHelper;

    invoke-virtual {v2}, Lcom/qq/xgdemo/common/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    .line 50
    .local v0, "db":Landroid/database/sqlite/SQLiteDatabase;
    new-instance v1, Landroid/content/ContentValues;

    invoke-direct {v1}, Landroid/content/ContentValues;-><init>()V

    .line 51
    .local v1, "values":Landroid/content/ContentValues;
    const-string v2, "msg_id"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getMsg_id()Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 52
    const-string v2, "title"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 53
    const-string v2, "content"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getContent()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 54
    const-string v2, "activity"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getActivity()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 55
    const-string v2, "notificationActionType"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getNotificationActionType()I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 56
    const-string v2, "update_time"

    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getUpdate_time()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 57
    const-string v2, "notification"

    const-string v3, "id=?"

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/String;

    const/4 v5, 0x0

    .line 58
    invoke-virtual {p1}, Lcom/qq/xgdemo/common/XGNotification;->getId()Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/Integer;->toString()Ljava/lang/String;

    move-result-object v6

    aput-object v6, v4, v5

    .line 57
    invoke-virtual {v0, v2, v1, v3, v4}, Landroid/database/sqlite/SQLiteDatabase;->update(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 59
    return-void
.end method
